home *** CD-ROM | disk | FTP | other *** search
/ CICA 1993 April / CICA MS Windows - April 1993.iso / unzipped / programr / tp / drovtb / toolbox.pas < prev   
Pascal/Delphi Source File  |  1992-03-17  |  54KB  |  1,563 lines

  1. unit Toolbox;
  2. interface
  3. uses WinTypes;
  4.  
  5. const
  6.   GHND       = (GMEM_MOVEABLE or GMEM_ZEROINIT or GMEM_DDESHARE);
  7.  
  8.   DLL_TBPRO2 = $01;
  9.   DLL_TBPRO3 = $02;
  10.   DLL_TBPRO4 = $04;
  11.   DLL_TBPRO5 = $08;
  12.   DLL_TBPRO6 = $10;
  13.  
  14.   DRIVELEN =   3;                 (* max length of drive in file name *)
  15.   DIRLEN   = 130;                 (* max length of directory *)
  16.   NAMELEN  =  10;                 (* max length of name in file name *)
  17.   EXTLEN   =   5;                 (* max length of extn in file name *)
  18.   FILELEN  = (NAMELEN+EXTLEN);    (* max length of file name *)
  19.   PATHLEN  = (DRIVELEN+DIRLEN+FILELEN);(* max full file name path *)
  20.  
  21.   ERRLEN     = 100;               (* ERROR length *)
  22.   INTLEN     =   7;               (* max integer string length *)
  23.   LONGLEN    =  11;               (* max long string length *)
  24.   DATELEN    =  12;               (* Length of date string: dd-mmm-[yy]yy *)
  25.   LIBVERSION =  10;               (* LIBRARY VERSION *)
  26.  
  27. type
  28.   PWinDevice = ^TWinDevice;
  29.   TWinDevice = record
  30.     DeviceName : array[0..50] of Char;
  31.     DriverName : array[0..9]  of Char;
  32.     Port       : array[0..40] of Char;
  33.   end;
  34.  
  35. { Passed to date functions to set date parameters                        }
  36. { Structures for holding the actual values for the Date and Time values: }
  37.  
  38.   PDate = ^TDate;
  39.   TDate = record
  40.     nDay, nMonth, nYear: Integer
  41.   end;
  42.  
  43.   PTime = ^TTime;
  44.   TTime = record
  45.     nHour, nMinute, nSecond: Integer
  46.   end;
  47.  
  48.   PDateFormat = ^TDateFormat;
  49.   TDateFormat = record
  50.     bCentury   : Boolean;
  51.     cSeparator : Char;
  52.     nFormat    : Integer;
  53.     bSpin      : Boolean
  54.   end;
  55.  
  56.   PTimeFormat = ^TTimeFormat;
  57.   TTimeFormat = record
  58.     b24Hour, bSeconds : Boolean;
  59.     cSeparator        : Char;
  60.     bSpin             : Boolean
  61.   end;
  62.  
  63.   PFloatFormat = ^TFloatFormat;
  64.   TFloatFormat = record
  65.     cCurrencySign,
  66.     cDecimalSign,
  67.     cSeparator     : Char
  68.   end;
  69.  
  70.  
  71. { DATE FORMAT IDENTIFIERS }
  72. const
  73.   IDF_DDMONYY =   100;
  74.   IDF_DDMMYY  =   101;
  75.   IDF_MMDDYY  =   102;
  76.   IDF_YYMMDD  =   103;
  77.  
  78.  
  79. function DateAddDays      (var ADate: TDate; APeriode: Longint): PDate;
  80. function DateDMYToJulian  (var ADate: TDate)                     : Longint;
  81. function DateDMYToString  (var ADate: TDate; ADateStr: PChar; var aFormat: TDateFormat) : PChar;
  82. function DateGetFormat    (AWnd: hWnd; var aFormat: TDateFormat) : Boolean;
  83. function DateGetWeekday   (var aDate: TDate; AWeekDay: PChar)    : PChar;
  84. function DateIntIsValid   (var aDate: TDate) : Boolean;
  85. function DateJulianToDMY  (aPeriode: Longint; var aDate: TDate)  : PDate;
  86. function DateSetFormat    (aWnd: hWnd; var aFormat: TDateFormat) : Boolean;
  87. function DateSetRange     (AWnd: hWnd; var aMin, aMax: TDate)      : Boolean;
  88. function DateStringIsValid(aStr: PChar; var aFormat: TDateFormat): Boolean;
  89. function DateStringToDMY  (aStr: PChar; var aDate: TDate; var aFormat: TDateFormat): PDate;
  90. function DateSubtractDates(var FromDate, ToDate: TDate)          : Longint;
  91. {
  92. function DateGetDlgItemFormat(aDlg: hWnd; anID: Integer; var aDateFmt: TDateFormat): Boolean;
  93. function DateSetDlgItemFormat(aDlg: hWnd; anID: Integer; var aDateFmt: TDateFormat): Boolean;
  94. function DateSetDlgItemRange (aDlg: hWnd; anID: Integer; var Min: TDate; var Max: TDate): Boolean;
  95. }
  96.  
  97. function PopupCalender      (aTBDateWnd: hWnd): Boolean;
  98.  
  99. function TimeGetFormat      (aWnd: hWnd; var aTimeFormat: TTimeFormat): Boolean;
  100. function TimeHMSToSeconds   (var Time: TTime): Longint;
  101. function TimeHMSToString    (var aTime: TTime; aTimeStr: PChar; var aTimeFormat: TTimeFormat): PChar;
  102. function TimeSecondsToHMS   (Seconds: Longint; var aTime: TTime): PTime;
  103. function TimeSetFormat      (aWnd: hWnd; var aTimeFormat: TTimeFormat): Boolean;
  104. function TimeSetRange       (aWnd: hWnd; var aMin: TTime; var aMax: TTime): Boolean;
  105. function TimeStringIsValid  (aTimeStr: PChar; var aTimeFormat: TTimeFormat): Boolean;
  106. function TimeStringToHMS    (aTimeStr: PChar; var aTime: TTime; var aTimeFormat: TTimeFormat): PTime;
  107. procedure TimeGetCurrentTime(aTimeStr: PChar; var aTimeFormat: TTimeFormat);
  108. { TimeGetDlgItemFormat - TimeSetDlgItemRange }
  109.  
  110. function IntSetRange   (aWnd: hWnd; lMin, lMax: Longint): Boolean;
  111. function IntGetRange   (aWnd: hWnd; var lMin, lMax: Longint): Boolean;
  112. function IntSetValue   (aWnd: hWnd; l: Longint): Boolean;
  113. function IntGetValue   (aWnd: hWnd; var l: Longint): Boolean;
  114. function IntSetMask    (aWnd: hWnd; aMask: PChar): Boolean;
  115. function IntSetSpin    (aWnd: hWnd; aSpin, aSpinWrap: Boolean; aSpinInc: Longint): Boolean;
  116. function IntGetSpin    (aWnd: hWnd; var SpinWrap: Boolean; var SpinInc: Longint): Boolean;
  117.  
  118. { IntSetDlgItemRange - IntGetDlgItemValue }
  119.  
  120. function FloatGetValue (aWnd: hWnd; var aDouble: Double): Boolean;
  121. function FloatSetValue (aWnd: hWnd; aDouble: Double): Boolean;
  122. function FloatSetRange (aWnd: hWnd; aMin, aMax: Double): Boolean;
  123. function FloatGetRange (aWnd: hWnd; var aMin, aMax: Double): Boolean;
  124. function FloatSetFormat(aWnd: hWnd; var ff: TFloatFormat): Boolean;
  125. function FloatGetFormat(aWnd: hWnd; var ff: TFloatFormat): Boolean;
  126. function FloatSetStyle(aWnd: hWnd; aStyle: Longint): Boolean;
  127. function FloatFormatString(aVal: Double; szBuffer: PChar; fSeparator, fMoney: Boolean;
  128.                    iDecimalPlaces: Integer): PChar;
  129. function FloatFormatString2(aVal: Double; szBuffer: PChar; var lpFromat: TFloatFormat;
  130.                             iDecimalPlaces: Integer): PChar;
  131. function FloatSetMask (aWnd: hWnd; szMaske: PChar): Boolean;
  132. { FloatSetDlgItemRange - FloatSetDlgItemValue }
  133.  
  134. function GetToolBoxGlobal (nID: Integer; var lValue: Longint): Boolean;
  135. function SetToolBoxGlobal (nID: Integer;     lValue: Longint): Boolean;
  136. {
  137. function DlgCoordToPixelX(x: Integer): Integer;
  138. function DlgCoordToPixelY(y: Integer): Integer;
  139. }
  140.  
  141. const
  142.   TBG_CURRENTDATETIME = 1;
  143.   TBG_POPUPCALENDAR   = 2;
  144.   TBG_CLEARFIELD      = 3;
  145.  
  146.   ERR_AUTO            = 100;
  147.  
  148. {$IFNDEF DRV_NOPATTERN}
  149. { function prototypes for Pattern }
  150. {$ENDIF}
  151.  
  152. {$IFNDEF DRV_NOSYS}
  153. const
  154.   FI_NORMAL      = $00;    (* Normal file - No read/write restrictions *)
  155.   FI_RDONLY      = $01;    (* Read only file *)
  156.   FI_HIDDEN      = $02;    (* Hidden file *)
  157.   FI_SYSTEM      = $04;    (* System file *)
  158.   FI_VOLID       = $08;    (* Volume ID file *)
  159.   FI_SUBDIR      = $10;    (* Subdirectory *)
  160.   FI_ARCH        = $20;    (* Archive file *)
  161.   FI_EXCLUSIVE   = $80;    (* only those selected by above attributes *)
  162.  
  163. type
  164.   PFileInfo = ^TFileInfo;
  165.   TFileInfo = record
  166.     reserved : array[0..20] of Char;
  167.     attrib   : Char;
  168.     time,
  169.     date     : Integer;
  170.     fileSize : Longint;
  171.     fileName : array[0..12] of Char
  172.   end;
  173.  
  174.   PDiskInfo = ^TDiskInfo;
  175.   TDiskInfo = record
  176.     bytesPerSector,                { Bytes in a Sector (normally 512) }
  177.     clustersPerDrive,              { Clusters per Device              }
  178.     sectorsPerCluster,             { Sectors in a Cluster             }
  179.     avaliableClusters: Word        { Number of free Clusters          }
  180.   end;
  181.  
  182.   PParamBlk = ^TParamBlk;
  183.   TParamBlk = record
  184.     wSegmentEnvBlock,              { segment pointer to environment block }
  185.     wOffSetCmdLine,                { offset of command line               }
  186.     wSegmentCmdLine,               { segment of command line              }
  187.     wOffSetFCB1,                   { etc.                                 }
  188.     wSegmentFCB1,
  189.     wOffSetFCB2,
  190.     wSegmentFCB2     : Word
  191.   end;
  192.  
  193. {**********************************************
  194. * System and File-Related Function Prototypes
  195. **********************************************}
  196.  
  197. function GetFileString     (lpszKey, lpszDefault, lpReturn: PChar; nSize: Integer;
  198.                             lpszFile: PChar): Integer;
  199. function SysCreateSubDir   (szNewSubDir: PChar): Integer;
  200. function SysDeleteFile     (szExistingFile: PChar): Integer;
  201. function SysDeleteSubDir   (szExistingDir : PChar): Integer;
  202. function SysDiskBytesFree  (iDrive: Integer): Longint;
  203. function SysDiskBytesTotal (iDrive: Integer): Longint;
  204. function SysDiskInfo       (iDrive: Integer; var di: TDiskInfo): Boolean;
  205. function SysExecPgm        (szPath: PChar; var aParam: TParamBlk): Integer;
  206. function SysFileSpec       (lpszPattern, lpszFileName: PChar): Boolean;
  207. { SysFindFirst - SysGetFileAttr }
  208.  
  209. {$ENDIF}
  210.  
  211. (* auto messagebox functions *)
  212. const
  213.   DRVMSG_BEEP = $01;
  214.   DRVMSG_LOG  = $10;
  215.  
  216. function InitToolbox     (hInst: THandle): Boolean;
  217. function ToolboxLoadDlls (dDlls: Integer): Boolean;
  218. procedure ToolboxFreeDlls(dDlls: Integer);
  219. procedure ToolboxFreeAllDlls;
  220. function GetToolboxVersion: Word;
  221.  
  222. (* HOUR GLASS FUNCTIONS *)
  223. function HourGlassCount: Word;
  224. procedure HourGlassOff;
  225. procedure HourGlassOn;
  226.  
  227. (* STRING FUNCTIONS *)
  228. {StrCat - LongToString}
  229. function StrRTrim(aString: PChar) : PChar;
  230.  
  231. (* CONVERSION FUNCTIONS *)
  232. { FloatToEString - StringToLong }
  233.  
  234. (* FILE FUNCTIONS *)
  235. { ErrorNo - FileGetDateTime }
  236.  
  237. (* LIST BOX FUNCTIONS *)
  238. { ListAddStr - ListSelectStr }
  239.  
  240. (* FAR POINTER MEMORY FUNCTIONS (+ ALLOCATION ) *)
  241. { MemCmp - MemiCmd }
  242.  
  243. (* huge POINTER MEMORY FUNCTIONS *)
  244. { MemHugeCmp - MemHugecCpy }
  245.  
  246. (* MESSAGE DISPLAY *)
  247. { Debug }
  248. { function _MsgDisp        (aWnd: hWnd; iId: Integer; var args: PChar): Integer; }
  249. function MsgDoDisp       (lpMsg, lpTitle: PChar; iStyle: Integer; iFlags: Integer): Integer;
  250. function MsgLoad         (aHnd: THandle; iId: Integer; lpMsg, lpTitle: PChar;
  251.                                   lpMFlags, lpIFlags: PInteger ): PChar;
  252.  
  253. (* misc.c *)
  254. function DlgFileOpenOne  (aWnd: hWnd; lpszFileSpec, spszFile: PChar; iLength: Integer): Boolean;
  255. function DlgFileOpenTwo  (aWnd: hWnd; lpszFileSpec, spszFile: PChar; iLength: Integer): Boolean;
  256. function DlgFontSelect   (aWnd: hWnd; var LogFont: TLogFont; var FontType: Integer): Boolean;
  257. function DlgPrinterSetup (aWnd: hWnd) : Boolean;
  258. { EnumFiles }
  259. procedure ExitNow;
  260. function FullMkDir       (lpPath: PChar): Integer;
  261.  
  262. function GaugeGetPos     (aWnd: hWnd; var aPos: Integer): Boolean;
  263. function GaugeGetRange   (aWnd: hWnd; var aMin, aMax: Integer): Boolean;
  264. function GaugeSetColors  (aWnd: hWnd; RGBBack, RGBPlate, RGBText, RGBFill: TColorRef): Boolean;
  265. function GaugeSetPos     (aWnd: hWnd; iPos: Integer): Boolean;
  266. function GaugeSetRange   (aWnd: hWnd; iMin, iMax: Integer): Boolean;
  267. function GaugeSetTitle   (aWnd: hWnd; szTitle: PChar): PChar;
  268. procedure GetChildSize   (aWnd: hWnd; var Rect: TRect);
  269. { MsgBox }
  270. procedure MsgLineMenuHelp(aWnd: hWnd; iID: Word);
  271. procedure MsgLinePaint   (aWnd: hWnd; aDC: hDC);
  272. procedure MsgLineTextOut (aWnd: hWnd; lpText: PChar);
  273. procedure OLRect         (aDC: hDC; lpRect: PRect);
  274. procedure OLLine         (aDC: hDC; ia, ib, ic, id, ie: Integer);
  275. function PrinterGetDC    : hDC;
  276. function PrinterGetIC    : hDC;
  277. function PrinterGetDetails(var WinDevice: TWinDevice): Boolean;
  278. function RmTmp           : Integer;
  279. function WinExecProg     (szPath, CmdLine: PChar; nCmdShow: Integer): Integer;
  280.  
  281. const
  282.  
  283. (* SORT *)
  284. { QuickSort - LinearFindHuge }
  285.  
  286. (* Listbox Notification Codes *)
  287.   LBN_ESCAPE        = 30;       { the user pressed the escape key }
  288.   LBN_RETURN        = 31;       { the user pressed the return key }
  289.  
  290.   LBN_TOPITEM       = 1000;
  291.   LBN_RBUTTONDBLCLK = 1001;     { our own notification            }
  292.   LBN_MBUTTONDBLCLK = 1002;     { our own notification            }
  293.   LBN_LBUTTONDBLCLK = 1003;     { our own notification            }
  294.  
  295. (* LB_DIR attributes *)
  296.   LBDA_NORMAL       = $0000;
  297.   LBDA_READONLY     = $0001;
  298.   LBDA_HIDDEN       = $0002;
  299.   LBDA_SYSTEM       = $0004;
  300.   LBDA_SUBDIR       = $0010;
  301.   LBDA_ARCHIVE      = $0020;
  302.  
  303. { Windows places the messages generated by DlgDirList in the application queue;
  304.   otherwise sent directly to the dialog function                                 }
  305.   LBDA_DIRFLAG      = $2000;
  306.   LBDA_DRIVE        = $4000;
  307.   LBDA_EXCLUSIVE    = $8000;
  308.  
  309.   EM_VALIDATE       = (EM_MSGMAX + 1);
  310.   EM_GETCARETPOS    = (EM_MSGMAX + 2);
  311.   EM_SETCARETPOS    = (EM_MSGMAX + 3);
  312.   EM_CARETPOS       = (EM_MSGMAX + 4);
  313.   EM_SETRANGE       = (EM_MSGMAX + 5);
  314.   EM_SETFORMAT      = (EM_MSGMAX + 6);
  315.   EM_GETFORMAT      = (EM_MSGMAX + 7);
  316.   EPM_GETMASK       = (EM_MSGMAX + 8);
  317.   EPM_SETMASK       = (EM_MSGMAX + 9);
  318.   EPM_SETCALLBACK   = (EM_MSGMAX + 10);
  319.   EM_TOOLBOXUSERMAX = (EPM_SETCALLBACK);
  320.  
  321.   EN_INVALIDDATA    = $1000;
  322.   EN_FIELDNONEMPTY  = $1001;
  323.   EN_FIELDEMPTY     = $1002;
  324.   EN_INVALIDSETTEXT = $1003;
  325.   EN_INVALIDCHAR    = $2003;
  326.  
  327.   LB_SETSELECTIONMODE = (LB_MSGMAX+0);
  328.   LB_GETTEXTEXTENT    = (LB_MSGMAX+1);
  329.   LB_GETDBLCLKHPOS    = (LB_MSGMAX+2);
  330.   LB_GETDBLCLKITEM    = (LB_MSGMAX+3);
  331.  
  332. {****************
  333. * Gauge control
  334. ****************}
  335.  
  336.   GS_TITLE        = $00000001;
  337.   GS_VALUE        = $00000010;
  338.  
  339. {*****************
  340. * General styles
  341. *****************}
  342.  
  343.   ES_STATIC      = $0200;
  344.   ES_OVERSTRIKE  = $0800;
  345.  
  346. {**************
  347. * Time fields
  348. **************}
  349.  
  350.   TS_12HOUR      = $1000;
  351.   TS_24HOUR      = $2000;
  352.   TS_SECONDS     = $4000;
  353.   TS_SPIN        = $8000;
  354.  
  355. {**************
  356. * Date fields
  357. **************}
  358.  
  359.   DS_SPIN        = $0040;
  360.   DS_DEFCENTURY  = $0004;
  361.   DS_CENTURY     = $1000;
  362.   DS_DDMONYY     = $2000;
  363.   DS_DDMMYY      = $4000;
  364.   DS_MMDDYY      = $6000;
  365.   DS_YYMMDD      = $8000;
  366.  
  367. {****************
  368. * Integer Style
  369. ****************}
  370.  
  371.   IS_SPIN        = $1000;
  372.   IS_SPINWRAP    = $2000;
  373.  
  374. {**************
  375. * Float Style
  376. **************}
  377.  
  378.   FS_MONEY       = $1000;
  379.   FS_SEPARATOR   = $2000;
  380.  
  381. {********************************
  382. * Define WM_CTLCOLOR parameters
  383. ********************************}
  384.  
  385.   CTLCOLOR_TBEDIT     = (101);
  386.   CTLCOLOR_TBPROGRESS = (102);
  387.   CTLCOLOR_TBSPINNUM  = (103);
  388.   CTLCOLOR_TBTIMESPIN = (104);
  389.   CTLCOLOR_TBDATESPIN = (105);
  390.   CTLCOLOR_TBVIEWPICT = (106);
  391.  
  392. {**********
  393. * DirFile
  394. **********}
  395.  
  396.   DFM_GETSIZE          = (WM_USER + 30);
  397.   DFM_SETSIZE          = (WM_USER + 31);
  398.  
  399.   DFN_SETFOCUS         = 30;
  400.   DFN_KILLFOCUS        = 31;
  401.   DFN_SIZECHANGE       = 32;
  402.  
  403.   DFS_DIRRIGHT            = $0001;
  404.   DFS_NOUPDATEFILELIST    = $0002;
  405.   DFS_CLOSEALLCHILDREN    = $0004;
  406.   DFS_OPENROOTCHILDREN    = $0008;
  407.   DFS_FOLDEROPENDIR       = $0010;
  408.   DFS_FILELIST_NOSHOWICON = $0020;
  409.   DFS_FILELIST_VERT       = $0040;
  410.   DFS_FILELIST_HORZ       = $0080;
  411.   DFS_FILELIST_SHOW_SIZE  = $0100;
  412.   DFS_FILELIST_SHOW_DATE  = $0200;
  413.   DFS_FILELIST_SHOW_TIME  = $0400;
  414.  
  415. {**********
  416. * DirList
  417. **********}
  418.  
  419.   DLM_SETDRIVE              = (WM_USER + 0);
  420.   DLM_READDRIVE             = (WM_USER + 1);
  421.   DLM_GETSELDIRENTRY        = (WM_USER + 2);
  422.   DLM_GETSELDIR             = (WM_USER + 3);
  423.   DLM_GETDIRCNT             = (WM_USER + 4);
  424.   DLM_SETSELDIR             = (WM_USER + 5);
  425.   DLM_SETCOLOR              = (WM_USER + 6);
  426.   DLM_OPENCHILDREN          = (WM_USER + 7);
  427.   DLM_GETCOLOR              = (WM_USER + 8);
  428.  
  429.   DLN_SETFOCUS              = 10;
  430.   DLN_KILLFOCUS             = 11;
  431.   DLN_SELCHANGE             = 12;
  432.   DLN_DBLCLK                = 13;
  433.  
  434.   DLS_CLOSEALLCHILDREN      = $01;
  435.   DLS_OPENROOTCHILDREN      = $02;
  436.   DLS_FOLDEROPENDIR         = $04;
  437.  
  438.   DIRLIST_CHILDREN_OPENALL  = 0;
  439.   DIRLIST_CHILDREN_OPENROOT = 1;
  440.   DIRLIST_CHILDREN_CLOSEALL = 2;
  441.   DIRLIST_CHILDREN_OPENCUR  = 3;
  442.   DIRLIST_CHILDREN_CLOSECUR = 4;
  443.   DIRLIST_CHILDREN_FLIPCUR  = 5;
  444.  
  445. type
  446.   PDirListColor = ^TDirListColor;
  447.   TDirListColor = record
  448.      ColorBack,
  449.      ColorText,
  450.      ColorLines,
  451.      ColorIconShadow,
  452.      ColorIconBack,
  453.      ColorIconFore : TColorRef
  454.   end;
  455.  
  456.  
  457.  
  458. {************
  459. * DriveList
  460. ************}
  461.  
  462. const
  463.   DVLM_GETDRIVECOUNT        = (WM_USER + 0);
  464.   DVLM_GETSELDRIVE          = (WM_USER + 1);
  465.   DVLM_SETSELDRIVE          = (WM_USER + 2);
  466.   DVLM_SETCOLOR             = (WM_USER + 3);
  467.   DVLM_GETCOLOR             = (WM_USER + 4);
  468.  
  469.   DVLN_SETFOCUS             = 10;     { Used Internally }
  470.   DVLN_KILLFOCUS            = 11;
  471.   DVLN_SELCHANGE            = 12;     { Used Internally }
  472.   DVLN_DBLCLK               = 13;
  473.   DVLN_DRIVECHANGE          = 14;
  474.  
  475.   DVLS_DRIVELIST_FIXED      = $01;
  476.   DVLS_DRIVELIST_REMOTE     = $02;
  477.   DVLS_DRIVELIST_REMOVABLE  = $04;
  478.   DVLS_DRIVELIST_ALL        = $07;
  479.   DVLS_DRIVELIST_LISTBOX    = $08;
  480.   DVLS_DRIVELIST_COMBOBOX   = $10;
  481.   DVLS_DRIVELIST_NOSHOWICON = $20;
  482.  
  483. type
  484.   PDriveListColor = ^TDriveListColor;
  485.   TDriveListColor = record
  486.     ColorBack,
  487.     ColorText,
  488.     ColorIconShadowBright,
  489.     ColorIconShadowDark,
  490.     ColorIconBack,
  491.     ColorIconFore,
  492.     ColorIconLight  : TColorRef;
  493.   end;
  494.  
  495.  
  496. {***********
  497. * FileList
  498. ***********}
  499.  
  500. const
  501.   FLM_SETDIRECTORY        = (WM_USER + 10);   { Used Internally }
  502.   FLM_READDIRECTORY       = (WM_USER + 11);
  503.   FLM_SETVIEWTYPE         = (WM_USER + 12);
  504.   FLM_SETSORTMETHOD       = (WM_USER + 13);
  505.   FLM_SETSORTORDER        = (WM_USER + 14);
  506.   FLM_SETCOLOR            = (WM_USER + 15);
  507.   FLM_GETFILECOUNT        = (WM_USER + 16);
  508.   FLM_GETSELFILE          = (WM_USER + 17);
  509.   FLM_SETSELFILE          = (WM_USER + 18);
  510.   FLM_SETFILESPEC         = (WM_USER + 19);
  511.   FLM_GETCOLOR            = (WM_USER + 20);
  512.  
  513.   FLN_SETFOCUS            = 20;
  514.   FLN_KILLFOCUS           = 21;
  515.   FLN_SELCHANGE           = 22;
  516.   FLN_DBLCLK              = 23;
  517.  
  518.   FLS_FILELIST_SORT_NONE  = $0001;
  519.   FLS_FILELIST_SORT_NAME  = $0002;
  520.   FLS_FILELIST_SORT_DATE  = $0004;
  521.   FLS_FILELIST_SORT_SIZE  = $0008;
  522.   FLS_FILELIST_SORT_EXT   = $0010;
  523.   FLS_FILELIST_SORT_DESC  = $0020;
  524.   FLS_FILELIST_NOSHOWICON = $0040;
  525.   FLS_FILELIST_VERT       = $0080;
  526.   FLS_FILELIST_HORZ       = $0100;
  527.   FLS_FILELIST_SHOW_SIZE  = $0200;
  528.   FLS_FILELIST_SHOW_DATE  = $0400;
  529.   FLS_FILELIST_SHOW_TIME  = $0800;
  530.  
  531.   FILELIST_SORTORDER_ASC  = 0;
  532.   FILELIST_SORTORDER_DESC = 1;
  533.  
  534. type
  535.   PFileListColor = ^TFileListColor;
  536.   TFileListColor = record
  537.     ColorBack,
  538.     ColorText,
  539.     ColorIconShadow,
  540.     ColorIconExeBack,
  541.     ColorIconExeFore,
  542.     ColorIconExeUpper,
  543.     ColorIconDocBack,
  544.     ColorIconDocFore,
  545.     ColorIconDocUpper : TColorRef
  546.   end;
  547.  
  548. {**********
  549. * Imprint
  550. **********}
  551. const
  552.   IS_IMPRINT_OUT            = $0001;
  553.   IS_IMPRINT_IN             = $0002;
  554.   IS_FRAME_OUT              = $0004;
  555.   IS_FRAME_IN               = $0008;
  556.   IS_INSIDEBORDER           = $0010;
  557.   IS_OUTSIDEBORDER          = $0020;
  558.   IS_GROUPBOX               = $0040;
  559.   IS_CLEAR                  = $0080;
  560.   IS_TEXTBOTTOM             = $0100;
  561.   IS_TEXTCENTER             = $0200;
  562.   IS_TEXTLEFT               = $0400;
  563.   IS_TEXTRIGHT              = $0800;
  564.   IS_TEXTTOP                = $1000;
  565.   IS_TEXTVCENTER            = $2000;
  566.   IS_TEXTBORDER             = $4000;
  567.  
  568.   IM_GETFRAMESIZE           = (WM_USER + 0);
  569.   IM_GETLINECNT             = (WM_USER + 1);
  570.   IM_GETLINESIZE            = (WM_USER + 2);
  571.   IM_GETSHADOWSIZE          = (WM_USER + 3);
  572.   IM_SETCOLOR               = (WM_USER + 4);
  573.   IM_SETFRAMESIZE           = (WM_USER + 5);
  574.   IM_SETLINECNT             = (WM_USER + 6);
  575.   IM_SETLINESIZE            = (WM_USER + 7);
  576.   IM_SETSHADOWSIZE          = (WM_USER + 8);
  577.   IM_GETCOLOR               = (WM_USER + 9);
  578.  
  579. type
  580.   PImprintColor = ^TImprintColor;
  581.   TImprintColor = record
  582.     Color,
  583.     ColorFrame,
  584.     ColorShadow,
  585.     ColorHighlight,
  586.     ColorInsideBorder,
  587.     ColorOutsideBorder,
  588.     ColorText,
  589.     ColorLines          : TColorRef
  590.   end;
  591.  
  592.  
  593. {***********
  594. * Progress
  595. ***********}
  596.  
  597. const
  598.   PS_VERTICAL       = $01;
  599.   PS_HORIZONTAL     = $02;
  600.   PS_HIDEPERCENTAGE = $04;
  601.  
  602.  
  603.   PM_GETRANGE       = (WM_USER + 0);
  604.   PM_GETPOS         = (WM_USER + 1);
  605.   PM_SETRANGE       = (WM_USER + 2);
  606.   PM_SETPOS         = (WM_USER + 3);
  607.  
  608. {**********
  609. * SpinBtn
  610. **********}
  611.  
  612.   SBNS_UPARROW     = $01;
  613.   SBNS_DOWNARROW   = $02;
  614.   SBNS_UPDOWNARROW = $03;
  615.   SBNS_HORIZONTAL  = $04;
  616.   SBNS_VERTICAL    = $08;
  617.  
  618. {***********
  619. * SuperBtn
  620. ***********}
  621.  
  622.   SBS_DEFPUSHBUTTON        = $0001;
  623.   SBS_TEXTTOP_PICTBOT      = $0002;
  624.   SBS_TEXTBOT_PICTTOP      = $0004;
  625.   SBS_TEXTLEFT_PICTRIGHT   = $0008;
  626.   SBS_TEXTRIGHT_PICTLEFT   = $0010;
  627.   SBS_BTNFRAMEIN           = $0020;
  628.   SBS_BTNFRAMEOUT          = $0040;
  629.   SBS_PICTFRAMEIN          = $0080;
  630.   SBS_PICTFRAMEOUT         = $0100;
  631.   SBS_TEXTFRAMEIN          = $0200;
  632.   SBS_TEXTFRAMEOUT         = $0400;
  633.   SBS_NOINVERTFRAME        = $0800;
  634.   SBS_TEXTICON             = $1000;
  635.   SBS_TEXTBITMAP           = $2000;
  636.   SBS_TEXTTEXT             = $4000;
  637.   SBS_NOPOINTERFOCUS       = $8000;
  638.  
  639.   SBM_SETSTYLE             = BM_SETSTYLE;
  640.   SBM_SETCOLOR             = (WM_USER + 50);
  641.   SBM_SETPICT              = (WM_USER + 51);
  642.   SBM_SETPICT_DISABLED     = (WM_USER + 52);
  643.   SBM_SETPICT_BTNDOWN      = (WM_USER + 53);
  644.   SBM_GETCOLOR             = (WM_USER + 54);
  645.   SBM_SETBUTTONTYPE        = (WM_USER + 55); { Internal Use }
  646.   SBM_GETBUTTONSTATE       = (WM_USER + 56); { Internal Use }
  647.   SBM_SETBUTTONSTATE       = (WM_USER + 57); { Internal Use }
  648.   SBM_SETSHADOWSIZE        = (WM_USER + 58); { Internal Use }
  649.   SBM_GETSHADOWSIZE        = (WM_USER + 59); { Internal Use }
  650.  
  651.   SBN_CLICKED              = BN_CLICKED;
  652.  
  653.   SUPERBTN_UP              = 0;
  654.   SUPERBTN_DOWN            = 1;
  655.  
  656.   SUPERBTN_TYPE_NORMAL     = 0;
  657.   SUPERBTN_TYPE_2STATE     = 1;
  658.  
  659.   SUPERBTN_PICT_NONE       = $00;
  660.   SUPERBTN_PICT_ICON       = $01;
  661.   SUPERBTN_PICT_BITMAP     = $02;
  662.   SUPERBTN_PICT_HANDLE     = $04;
  663.  
  664. type
  665.   PSuperBtnColor = ^TSuperBtnColor;
  666.   TSuperBtnColor = record
  667.     Color,
  668.     ColorBorder,
  669.     ColorShadow,
  670.     ColorHighlight,
  671.     ColorText  : TColorRef
  672.   end;
  673.  
  674.  
  675. {***********
  676. * ViewText
  677. ***********}
  678.  
  679. const
  680.   VTS_OWNERSUPPLYTEXT       = $01;
  681.   VTS_NOHSCROLLBAR          = $02;
  682.   VTS_NOVSCROLLBAR          = $04;
  683.  
  684.   VTM_ADDSTRING             = (WM_USER + 0);
  685.   VTM_CLEAR                 = (WM_USER + 1);
  686.   VTM_DELETESTRING          = (WM_USER + 2);
  687.   VTM_GETLINECOUNT          = (WM_USER + 3);
  688.   VTM_GETSTRING             = (WM_USER + 4);
  689.   VTM_GETSTRINGLEN          = (WM_USER + 5);
  690.   VTM_GETTOPINDEX           = (WM_USER + 6);
  691.   VTM_HIGHLIGHTTEXT         = (WM_USER + 7);
  692.   VTM_INSERTSTRING          = (WM_USER + 8);
  693.   VTM_REDRAW                = (WM_USER + 9);
  694.   VTM_SEARCH                = (WM_USER + 10);
  695.   VTM_SEARCHREPEAT          = (WM_USER + 11);
  696.   VTM_SETCOLHEADERS         = (WM_USER + 12);
  697.   VTM_SETCOLOR              = (WM_USER + 13);
  698.   VTM_GETCOLOR              = (WM_USER + 14);
  699.   VTM_SETHEADER             = (WM_USER + 15);
  700.   VTM_SETROWHEADERS         = (WM_USER + 16);
  701.   VTM_SETTOPINDEX           = (WM_USER + 17);
  702.  
  703.   VTM_VIEWSIZE              = $0510;
  704.   VTM_RETRIEVETEXT          = $0511;
  705.  
  706.   VTN_KILLFOCUS             = 1;
  707.   VTN_SETFOCUS              = 2;
  708.  
  709.   VIEWTEXT_SEARCH_CASE      = $0001;
  710.   VIEWTEXT_SEARCH_NOCASE    = $0002;
  711.  
  712.   VIEWTEXT_SEARCH_CURRENT   = $0004;
  713.   VIEWTEXT_SEARCH_BEGIN     = $0008;
  714.   VIEWTEXT_SEARCH_END       = $0010;
  715.  
  716.   VIEWTEXT_SEARCH_FORWARD   = $0020;
  717.   VIEWTEXT_SEARCH_BACKWARD  = $0040;
  718.  
  719.   VIEWTEXT_SEARCH_SUBSTRING = $0080;
  720.   VIEWTEXT_SEARCH_WHOLEWORD = $0100;
  721.  
  722. type
  723.   PViewTextColor = ^TViewTextColor;
  724.   TViewTextColor = record
  725.     BackGround,
  726.     MainText,
  727.     Header,
  728.     ColTitles,
  729.     RowTitles,
  730.     HighLightText,
  731.     HighLightBk    : TColorRef
  732.   end;
  733.  
  734.  
  735.   PViewSize = ^TViewSize;
  736.   TViewSize = record
  737.     WidthMax, ItemCnt: Integer
  738.   end;
  739.  
  740.   PViewRetrieveText = ^TViewRetrieveText;
  741.   TViewRetrieveText = record
  742.     ItemNum  : Integer;
  743.     ItemText : PChar
  744.   end;
  745.  
  746.  
  747. {***********
  748. * ViewPict
  749. ***********}
  750.  
  751. const
  752.   VPS_NORMAL            = $0000;
  753.   VPS_CENTER            = $0001;
  754.   VPS_STRETCH           = $0002;
  755.   VPS_MAINTAINSCALE     = $0004;
  756.   VPS_SCROLL            = $0008;
  757.   VPS_RESOURCE          = $0010;
  758.   VPS_BMP               = $0020;
  759.   VPS_PCX               = $0040;
  760.   VPS_GIF               = $0080;
  761.   VPS_FREEZE            = $0100;
  762.   VPS_SHOWFRAMEONCE     = $0200;
  763.   VPS_STATIC            = $0400;
  764.  
  765. {********************
  766. * ViewPict Messages
  767. ********************}
  768.  
  769.   VPN_KILLFOCUS         = 1;
  770.   VPN_SETFOCUS          = 2;
  771.   VPN_BUTTONDOWN        = 3;
  772.   VPN_DBLCLK            = 4;
  773.  
  774.   VPM_SETPICTURE        = (WM_USER + 0);
  775.   VPM_CLEAR             = (WM_USER + 1);
  776.   VPM_SETSTYLE          = (WM_USER + 2);
  777.   VPM_GETPOINTERPOS     = (WM_USER + 3);
  778.  
  779.  
  780. {*************************
  781. * Messages for animation
  782. *************************}
  783.  
  784.   VPM_SETFRAMES         = (WM_USER + 4);
  785.   VPM_FREEZEANIMATION   = (WM_USER + 5);
  786.   VPM_STARTANIMATION    = (WM_USER + 6);
  787.   VPM_SHOWNEXTFRAME     = (WM_USER + 7);
  788.   VPM_SHOWPREVFRAME     = (WM_USER + 8);
  789.  
  790. {**************************
  791. * ViewPict Error Messages
  792. **************************}
  793.  
  794.   VIEWPICT_ERR_OK       = 0;
  795.   VIEWPICT_ERR_NOTFOUND = 1;
  796.   VIEWPICT_ERR_MEMORY   = 2;
  797.   VIEWPICT_ERR_FILEERR  = 3;
  798.   VIEWPICT_ERR_BADPICT  = 4;
  799.  
  800.   VIEWPICT_END          = -1;
  801.   VIEWPICT_DEFDELAY     = -1;
  802.  
  803. type
  804.   PViewPict_AnimateHdr = ^TViewPict_AnimateHdr;
  805.   TViewPict_AnimateHdr = record
  806.     PictureCnt, TimeDelay : Integer
  807.   end;
  808.  
  809.   PViewPict_AnimatePict = ^TViewPict_AnimatePict;
  810.   TViewPict_AnimatePict = record
  811.     PictName: PChar;
  812.     PictStyle,
  813.     x, y, TimeDelay : Integer
  814.   end;
  815.  
  816.   PViewpict_Animate = ^TViewpict_Animate;
  817.   TViewpict_Animate = record
  818.     AnimateHdr : TViewPict_AnimateHdr;
  819.     AnimatePict: PViewPict_AnimatePict
  820.   end;
  821.  
  822. {**************
  823. * SpreadSheet *
  824. **************}
  825.  
  826. {******************
  827. * Notify Messages
  828. ******************}
  829. const
  830.   SSM_DBLCLK            = $0501;
  831.   SSM_EDITMODEON        = $0502;
  832.   SSM_EDITMODEOFF       = $0503;
  833.   SSM_CELLLOCKED        = $0504;
  834.   SSM_ROWRESTRICTED     = $0505;
  835.   SSM_COLRESTRICTED     = $0506;
  836.   SSM_COLROWRESTRICTED  = $0507;
  837.   SSM_DATACHANGE        = $0508;
  838.   SSM_LEAVECELL         = $0509;
  839.  
  840.   SSN_SETFOCUS          = 51;
  841.   SSN_KILLFOCUS         = 52;
  842.   SSN_INVALIDDATA       = 53;
  843.   SSN_BLOCKSELECTED     = 54;
  844.   SSN_BLOCKCHANGED      = 55;
  845.   SSN_USERFORMULA       = 56;
  846.   SSN_EXITNEXT          = 57;    { Internal Use }
  847.   SSN_EXITPREV          = 58;    { Internal Use }
  848.   SSN_BUTTONDOWN        = 59;    { Internal Use }
  849.   SSN_BUTTONUP          = 60;    { Internal Use }
  850.  
  851.  
  852.   SSS_RESTRICTROWS      = $0001;
  853.   SSS_RESTRICTCOLS      = $0002;
  854.   SSS_PROTECTDOC        = $0004;
  855.   SSS_LOCKDOC           = $0008;
  856.   SSS_NORESIZE          = $0010;
  857.   SSS_NOSELECTBLOCK     = $0020;
  858.   SSS_NOGRIDLINES       = $0040;
  859.   SSS_ALLOWUSERFORMULAS = $0080;
  860.  
  861. type
  862.   TSS_Coord   = Integer;  PSS_Coord  = ^TSS_Coord;
  863.   TSS_FontID  = Integer;  PSS_FontID = ^TSS_FontID;
  864.   TSS_ColorID = Integer;  PSS_ColorID= ^TSS_ColorID;
  865.  
  866.  
  867.  
  868. {*********************************
  869. * Define Calculation definitions
  870. *********************************}
  871.  
  872. const
  873.   SS_CALC_MAXPARAMS      = 20;
  874.   SS_CALC_VARPARAMS      = -1;
  875.  
  876.  
  877. {*******************
  878. * Calculation List
  879. *******************}
  880.  
  881. type
  882.   PSS_CalcList = ^TSS_CalcList;
  883.   TSS_CalcList = record
  884.     hItems                : THandle;
  885.     ItemCnt, ItemAllocCnt : Integer;
  886.     ListBuilt             : Boolean
  887.   end;
  888.  
  889. {******************************
  890. * Calculation Value Structure *
  891. ******************************}
  892.  
  893. PSS_Value = ^TSS_Value;
  894. TSS_Value = record
  895.   Status   : Char;
  896.   Typ      : Char;
  897.   case Integer of
  898.   0:   (hValStr  : TGlobalHandle);
  899.   1:   (ValLong  : Longint);
  900.   2:   (ValDouble: Double);
  901. end;
  902.  
  903. TSS_CalcFunc = TFarProc;
  904.  
  905.  
  906. {*********************************
  907. * Define Calculation definitions
  908. *********************************}
  909.  
  910. const
  911.   SS_VALUE_STATUS_OK    = 0;
  912.   SS_VALUE_STATUS_ERROR = 1;
  913.   SS_VALUE_STATUS_EMPTY = 2;
  914.   SS_VALUE_STATUS_CLEAR = 3;
  915.   SS_VALUE_STATUS_NONE  = 4;
  916.  
  917.   SS_VALUE_TYPE_LONG    = 0;
  918.   SS_VALUE_TYPE_DOUBLE  = 1;
  919.   SS_VALUE_TYPE_STR     = 2;
  920.  
  921. {*****************************
  922. * Define font for font table
  923. *****************************}
  924.  
  925. type
  926.   PSS_Font = ^TSS_Font;
  927.   TSS_Font = record
  928.     FontId         : Integer;
  929.     Font           : hFont;
  930.     DeleteFont     : Boolean;
  931.     FontHeight     : Integer;
  932.     FontCellHeight : Double
  933.   end;
  934.  
  935.  
  936. {********************
  937. * SpreadSheet Color
  938. ********************}
  939.  
  940.   PSS_ColorItem = ^TSS_ColorItem;
  941.   TSS_ColorItem = record
  942.     BackgroundID,
  943.     ForegroundID : TSS_ColorID
  944.   end;
  945.  
  946.  
  947. {********************
  948. * SpreadSheet Color
  949. ********************}
  950.  
  951.   PSS_Color = ^TSS_Color;
  952.   TSS_Color = record
  953.     BackgroundId,
  954.     ForegroundId,
  955.     ShadowColorId,
  956.     ShadowTextId,
  957.     ShadowDarkId,
  958.     ShadowLightId  : TSS_ColorID
  959.   end;
  960.  
  961.  
  962. {******************
  963. * Cell Coordinate
  964. ******************}
  965.  
  966.   PSS_CellCoord = ^TSS_CellCoord;
  967.   TSS_CellCoord = record
  968.      Row, Col : TSS_Coord
  969.   end;
  970.  
  971.  
  972. {*************
  973. * Leave Cell
  974. *************}
  975.  
  976.   PSS_LeaveCell = ^TSS_LeaveCell;
  977.   TSS_LeaveCell = record
  978.     RowCurrent, ColCurrent,
  979.     RowNew    , ColNew     : TSS_Coord
  980.   end;
  981.  
  982.  
  983. {***********************
  984. * Cell Type definition
  985. ***********************}
  986.  
  987.   TSSEdit = record
  988.     ChrSet, Len   : Integer;
  989.     ChrCase       : Char
  990.   end;
  991.  
  992.   TSSInteger = record
  993.     Min, Max : LongInt
  994.   end;
  995.  
  996.   TSSFloat = record
  997.     Left, Right : Integer;
  998.     Min, Max    : Double
  999.   end;
  1000.  
  1001.   TSSComboBox = record
  1002.     ItemCnt,
  1003.     ItemDefault : Integer;
  1004.     Items       : THandle
  1005.   end;
  1006.  
  1007.   TSSTime = record
  1008.     SetFormat, SetRange : Boolean;
  1009.     Format              : TTimeFormat;
  1010.     Min, Max            : TTime
  1011.   end;
  1012.  
  1013.   TSSDate = record
  1014.     SetFormat, SetRange : Boolean;
  1015.     Format              : TDateFormat;
  1016.     Min, Max            : TDate
  1017.   end;
  1018.  
  1019.   TSSPic = record
  1020.     hClassName          : THandle
  1021.   end;
  1022.  
  1023.   TSSCustom = record
  1024.     hClassName          : THandle
  1025.   end;
  1026.  
  1027.   TSSViewPict = record
  1028.     hPictName           : THandle
  1029.   end;
  1030.  
  1031.   TSSButton = record
  1032.     hText,
  1033.     hPicName,
  1034.     hPictDownName       : THandle;
  1035.     nPictureType,
  1036.     nPictoreDownType    : Integer;
  1037.     ButtonType,
  1038.     ShadowSize          : Char;
  1039.     fSetColor           : Boolean;
  1040.     Color               : TSuperBtnColor
  1041.   end;
  1042.  
  1043.  
  1044.  
  1045.   PSS_CellType = ^TSS_CellType;
  1046.   TSS_CellType = record
  1047.      Typ        : Char;
  1048.      ControlID  : Integer;
  1049.      Style      : Longint;
  1050.      case Integer of
  1051.      0 : ( Edit    : TSSEdit);
  1052.      1 : ( Int     : TSSInteger);
  1053.      2 : ( Float   : TSSFloat);
  1054.      3 : ( Combo   : TSSComboBox);
  1055.      4 : ( Time    : TSSTime);
  1056.      5 : ( Date    : TSSDate);
  1057.      6 : ( Pic     : TSSPic);
  1058.      7 : ( Custom  : TSSCustom);
  1059.      8 : ( ViewPict: TSSViewPict);
  1060.      9 : ( Button  : TSSButton)
  1061.   end;
  1062.  
  1063.  
  1064. {******************
  1065. * Cell Definition
  1066. ******************}
  1067.  
  1068.   PSS_Cell = ^TSS_Cell;
  1069.   TSS_Cell = record
  1070.     CellLocked   : Boolean;
  1071.     FontId       : TSS_FontID;
  1072.     Color        : TSS_ColorItem;
  1073.     hData,
  1074.     hCellType,
  1075.     hCalc        : TGlobalHandle;
  1076.     Dependents   : TSS_CalcList
  1077.   end;
  1078.  
  1079. {*************************************************
  1080. * Define character sets for the string data type
  1081. *************************************************}
  1082.  
  1083. const
  1084.   SS_CHRSET_CHR         = 0;
  1085.   SS_CHRSET_ALPHA       = 1;
  1086.   SS_CHRSET_ALPHANUM    = 2;
  1087.   SS_CHRSET_NUM         = 3;
  1088.  
  1089. {***************************************
  1090. * Define case for the string data type
  1091. ***************************************}
  1092.  
  1093.   SS_CASE_LCASE         = 0;
  1094.   SS_CASE_NOCASE        = 1;
  1095.   SS_CASE_UCASE         = 2;
  1096.  
  1097. {**************************************************
  1098. * Define Plus and Minus for the numeric data type
  1099. **************************************************}
  1100.  
  1101.   SS_NUM_PLUSMINUS      = 0;
  1102.   SS_NUM_PLUS           = 1;
  1103.  
  1104. {*************
  1105. * Cell Types
  1106. *************}
  1107.  
  1108.   SS_TYPE_DATE          = 1;
  1109.   SS_TYPE_EDIT          = 2;
  1110.   SS_TYPE_PIC           = 3;
  1111.   SS_TYPE_FLOAT         = 4;
  1112.   SS_TYPE_INTEGER       = 5;
  1113.   SS_TYPE_STATICTEXT    = 6;
  1114.   SS_TYPE_TIME          = 7;
  1115.   SS_TYPE_PICTURE       = 8;
  1116.   SS_TYPE_BUTTON        = 10;      { Not Used }
  1117.  
  1118. {**************
  1119. * Text Styles
  1120. **************}
  1121.  
  1122.   SS_TEXT_LEFT          = $001;
  1123.   SS_TEXT_RIGHT         = $002;
  1124.   SS_TEXT_CENTER        = $004;
  1125.   SS_TEXT_VCENTER       = $008;
  1126.   SS_TEXT_TOP           = $010;
  1127.   SS_TEXT_BOTTOM        = $020;
  1128.   SS_TEXT_WORDWRAP      = $040;
  1129.   SS_TEXT_SHADOW        = $080;
  1130.   SS_TEXT_VERTICAL      = $100;
  1131.  
  1132.   SS_FONT_NONE          = -1;
  1133.  
  1134.   SS_ROWHEIGHT_DEFAULT  = 0;
  1135.   SS_COLWIDTH_DEFAULT   = 0;
  1136.  
  1137.   SS_MAXCOORD           = 32767;
  1138.  
  1139.   SS_FIRST              = -1;
  1140.   SS_LAST               = -2;
  1141.   SS_HEADER             = -SS_MAXCOORD;
  1142.  
  1143.   SS_VISIBLE_PARTIAL    = 0;
  1144.   SS_VISIBLE_ALL        = 1;
  1145.  
  1146.   SS_SCROLLAREA_ALL     = 0;
  1147.   SS_SCROLLAREA_COLS    = 1;
  1148.   SS_SCROLLAREA_ROWS    = 2;
  1149.   SS_SCROLLAREA_CELLS   = 3;
  1150.  
  1151.   SS_ALLCOLS            = -1;
  1152.   SS_ALLROWS            = -1;
  1153.  
  1154.   SSB_PROTECT           = 0;
  1155.   SSB_RESTRICTROWS      = 1;
  1156.   SSB_RESTRICTCOLS      = 2;
  1157.   SSB_SHOWCOLHEADERS    = 3;
  1158.   SSB_SHOWROWHEADERS    = 4;
  1159.   SSB_ALLOWUSERRESIZE   = 5;
  1160.   SSB_ALLOWUSERSELBLOCK = 6;
  1161.   SSB_AUTOCALC          = 7;
  1162.   SSB_REDRAW            = 8;
  1163.   SSB_GRIDLINES         = 9;
  1164.   SSB_HORZSCROLLBAR     = 10;
  1165.   SSB_VERTSCROLLBAR     = 11;
  1166.   SSB_ALLOWUSERFORMULAS = 12;
  1167.   SSB_EDITMODEPERMANENT = 13;    { Internal Use }
  1168.   SSB_AUTOSIZE          = 14;    { Internal Use }
  1169.   SSB_SCROLLBAREXTMODE  = 15;    { Internal Use }
  1170.  
  1171.   SS_SHOW_TOPLEFT       = 0;
  1172.   SS_SHOW_TOPCENTER     = 1;
  1173.   SS_SHOW_TOPRIGHT      = 2;
  1174.   SS_SHOW_CENTERLEFT    = 3;
  1175.   SS_SHOW_CENTER        = 4;
  1176.   SS_SHOW_CENTERRIGHT   = 5;
  1177.   SS_SHOW_BOTTOMLEFT    = 6;
  1178.   SS_SHOW_BOTTOMCENTER  = 7;
  1179.   SS_SHOW_BOTTOMRIGHT   = 8;
  1180.   SS_SHOW_NEAREST       = 9;
  1181.  
  1182. {**********************
  1183. * Function Prototypes
  1184. **********************}
  1185.  
  1186. function  SSSetRowHeight  (aWnd: hWnd; Row: TSS_Coord; Height: Double): Boolean;
  1187. function  SSGetRowHeight  (aWnd: hWnd; Row: TSS_Coord): Double;
  1188. function  SSInsRow        (aWnd: hWnd; Row: TSS_Coord): Boolean;
  1189. function  SSDelRow        (aWnd: hWnd; Row: TSS_Coord): Boolean;
  1190. function  SSSetColWidth   (aWnd: hWnd; Col: TSS_Coord; Width: Double): Boolean;
  1191. function  SSGetColWidth   (aWnd: hWnd; Col: TSS_Coord): Double;
  1192. function  SSInsCol        (aWnd: hWnd; Col: TSS_Coord): Boolean;
  1193. function  SSDelCol        (aWnd: hWnd; Col: TSS_Coord): Boolean;
  1194. function  SSSetData       (aWnd: hWnd; Col, Row: TSS_Coord; lpData: PChar): Boolean;
  1195. function  SSSetDataRange  (aWnd: hWnd; Col, Row, Col2, Row2: TSS_Coord; lpData: PChar): Boolean;
  1196. function  SSGetData       (aWnd: hWnd; Col, Row: TSS_Coord; lpData: PChar): Integer;
  1197. function  SSGetDataLen    (aWnd: hWnd; Col, Row: TSS_Coord): Integer;
  1198. function  SSGetVisible    (aWnd: hWnd; Col, Row: TSS_Coord; iVisible: Integer): Boolean;
  1199. function  SSGetEditMode   (aWnd: hWnd): Boolean;
  1200. function  SSSetEditMode   (aWnd: hWnd; fEditModeOn: Boolean): Boolean;
  1201. function  SSGetActiveCell (aWnd: hWnd; var Col, Row: TSS_Coord): Boolean;
  1202. function  SSSetActiveCell (aWnd: hWnd; Col, Row: TSS_Coord): Boolean;
  1203. procedure SSSetMaxRows    (aWnd: hWnd; MaxRows: TSS_Coord);
  1204. function  SSGetMaxRows    (aWnd: hWnd): TSS_Coord;
  1205. procedure SSSetMaxCols    (aWnd: hWnd; MaxCols: TSS_Coord);
  1206. function  SSGetMaxCols    (aWnd: hWnd): TSS_Coord;
  1207. function  SSGetSelectBlock(aWnd: hWnd; var CellUL, CellLR: TSS_CellCoord): Boolean;
  1208. function  SSSetSelectBlock(aWnd: hWnd; var CellUL, CellLR: TSS_CellCoord): Boolean;
  1209. procedure SSGetShadowColor(aWnd: hWnd; var ShColor, ShText, ShDark, ShLight: TColorRef);
  1210. procedure SSSetShadowColor(aWnd: hWnd;     ShColor, ShText, ShDark, ShLight: TColorRef);
  1211. function  SSSetTypeEdit   (aWnd: hWnd; var CType: TSS_CellType; Style: Longint;
  1212.                            Len, ChrSet: Integer; ChrCase: Byte): PSS_CellType;
  1213. function  SSSetTypePic    (aWnd: hWnd; var CType: TSS_CellType; Style: Longint;
  1214.                            Mask: PChar): PSS_CellType;
  1215. function  SSSetTypeStaticText(aWnd: hWnd; var CType: TSS_CellType; TextStyle: Integer): PSS_CellType;
  1216. function  SSSetTypeDate   (aWnd: hWnd; var CType: TSS_CellType; Style: Longint;
  1217.                            var Format: TDateFormat; var Min, Max: TDate): PSS_CellType;
  1218. function  SSSetTypeTime   (aWnd: hWnd; var CType: TSS_CellType; Style: Longint;
  1219.                            var Format: TTimeFormat; var Min, Max: TTime): PSS_CellType;
  1220. function  SSSetTypeInteger(aWnd: hWnd; var CType: TSS_CellType; Min, Max: Longint): PSS_CellType;
  1221. function  SSSetTypeFloat  (aWnd: hWnd; var CType: TSS_CellType; Style: Longint; Left, Right: Integer;
  1222.                            Min, Max: Double): PSS_CellType;
  1223. function  SSSetTypePicture(aWnd: hWnd; var CType: TSS_CellType; Style: Longint;
  1224.                            PictName: PChar): PSS_CellType;
  1225. function  SSSaveToFile    (aWnd: hWnd; FileName: PChar; DataOnly: Boolean): Boolean;
  1226. function  SSSavetoBuffer  (aWnd: hWnd; var BufferLen: Longint; DataOnly: Boolean): TGlobalHandle;
  1227. function  SSLoadFromFile  (aWnd: hWnd; FileName: PChar): Boolean;
  1228. function  SSLoadFromBuffer(aWnd: hWnd; Buffer: TGlobalHandle; BufferLen: Longint): Boolean;
  1229. function  SSBuildDependencies(aWnd: hWnd): Boolean;
  1230. function  SSAddCustomFunction(aWnd: hWnd; FunctionName: PChar; ParamCnt: Integer;
  1231.                               FunctionProg: TFarProc): Boolean;
  1232. function  SSShowCell      (aWnd: hWnd; Col, Row: TSS_Coord; Position: Integer): Boolean;
  1233. function  SSShowActiveCell(aWnd: hWnd; Position: Integer): Boolean;
  1234. function  SSSetFormula    (aWnd: hWnd; Col, Row: TSS_Coord; Formula: PChar;
  1235.                            BuildDependencies: Boolean): Boolean;
  1236. function  SSSetFormulaRange(aWnd: hWnd; Col, Row, Col2, Row2: TSS_Coord; Formula: PChar;
  1237.                            BuildDependencies: Boolean): Boolean;
  1238. function  SSGetFormula    (aWnd: hWnd; Col, Row: TSS_Coord; Furmula: PChar): Integer;
  1239. function  SSGetFormulaLen (aWnd: hWnd; Col, Row: TSS_Coord): Integer;
  1240. function  SSClear         (aWnd: hWnd; Col, Row: TSS_Coord): Boolean;
  1241. function  SSClearRange    (aWnd: hWnd; Col, Row, Col2, Row2: TSS_Coord): Boolean;
  1242. function  SSSetLock       (aWnd: hWnd; Col, Row: TSS_Coord; Lock: Boolean): Boolean;
  1243. function  SSSetLockRange  (aWnd: hWnd; Col, Row, Col2, Row2: TSS_Coord; Lock: Boolean): Boolean;
  1244. function  SSSetFont       (aWnd: hWnd; Col, Row: TSS_Coord; Font: hFont; DelFont: Boolean): Boolean;
  1245. function  SSSetFontRange  (aWnd: hWnd; Col, Row, Col2, Row2: TSS_Coord; Font: hFont;
  1246.                            DelFont: Boolean): Boolean;
  1247. function  SSGetFont       (aWnd: hWnd; Col, Row: TSS_Coord): THandle;
  1248. function  SSSetCellType   (aWnd: hWnd; Col, Row: TSS_Coord; var CType: TSS_CellType): Boolean;
  1249. function  SSSetCellTypeRange(aWnd: hWnd; Col, Row, Col2, Row2: TSS_Coord;
  1250.                              var CType: TSS_CellType): Boolean;
  1251. function  SSGetCellType   (aWnd: hWnd; Col, Row: TSS_Coord; var CType: TSS_CellType): Boolean;
  1252. function  SSSetColor      (aWnd: hWnd; Col, Row: TSS_Coord; Background, Foreground: TColorRef): Boolean;
  1253. function  SSSetColorRange (aWnd: hWnd; Col, Row, Col2, Row2: TSS_Coord;
  1254.                            Background, Foreground: TColorRef): Boolean;
  1255. function  SSGetColor      (aWnd: hWnd; Col, Row: TSS_Coord;
  1256.                            var Background, Foreground: TColorRef): Boolean;
  1257. function  SSGetTopLeftCell(aWnd: hWnd): Longint;
  1258. function  SSGetBottomRightCell(aWnd: hWnd): Longint;
  1259. function  SSSetBool       (aWnd: hWnd; Index: Integer; NewVal: Boolean): Boolean;
  1260. function  SSGetBool       (aWnd: hWnd; Index: Integer): Boolean;
  1261. function  SSClipOut       (aWnd: hWnd; Col, Row, Col2, Row2: TSS_Coord): THandle;
  1262. function  SSClipIn        (aWnd: hWnd; Col, Row, Col2, Row2: TSS_Coord; lpBuffer: PChar; BufLen: Longint): Boolean;
  1263. function  SSSetSel        (aWnd: hWnd; SelStart, SelEnd: Integer): Boolean;
  1264. function  SSGetSel        (aWnd: hWnd; var SelStart, SelEnd: Integer): Boolean;
  1265. function  SSReplaceSel    (aWnd: hWnd; Txt: PChar): Boolean;
  1266. function  SSGetSelText    (aWnd: hWnd): TGlobalHandle;
  1267. function  SSValidateFormula(aWnd: hWnd; Formula: PChar): Boolean;
  1268. function  SSLogUnitstoColWidth(aWnd: hWnd; Units: Integer): Double;
  1269. function  SSLogUnitsToRowHeight(aWnd: hWnd; Row: TSS_Coord; Units: Integer): Double;
  1270. function  SSColWidthToLogUnits(aWnd: hWnd; ColWidth: Double): Integer;
  1271. function  SSRowHeightToLogUnits(aWnd: hWnd; Row: TSS_Coord; RowHeight: Double): Integer;
  1272. function  SSRecalc(aWnd: hWnd): Boolean;
  1273. function  SSDeSelectBlock (aWnd: hWnd): Boolean;
  1274.  
  1275.  
  1276. {*********
  1277. * Colors
  1278. *********}
  1279.  
  1280. {
  1281. #define RGBCOLOR_DEFAULT   -1L
  1282. #define RGBCOLOR_WHITE     RGB(255, 255, 255)
  1283. #define RGBCOLOR_BLUE      RGB(0, 0, 255)
  1284. #define RGBCOLOR_RED       RGB(255, 0, 0)
  1285. #define RGBCOLOR_PINK      RGB(255, 0, 255)
  1286. #define RGBCOLOR_GREEN     RGB(0, 255, 0)
  1287. #define RGBCOLOR_CYAN      RGB(0, 255, 255)
  1288. #define RGBCOLOR_YELLOW    RGB(255, 255, 0)
  1289. #define RGBCOLOR_BLACK     RGB(0, 0, 0)
  1290. #define RGBCOLOR_DARKGRAY  RGB(128, 128, 128)
  1291. #define RGBCOLOR_DARKBLUE  RGB(0, 0, 128)
  1292. #define RGBCOLOR_DARKRED   RGB(128, 0, 0)
  1293. #define RGBCOLOR_DARKPINK  RGB(255, 0, 128)
  1294. #define RGBCOLOR_DARKGREEN RGB(0, 128, 0)
  1295. #define RGBCOLOR_DARKCYAN  RGB(0, 128, 128)
  1296. #define RGBCOLOR_BROWN     RGB(128, 128, 64)
  1297. #define RGBCOLOR_PALEGRAY  RGB(192, 192, 192)
  1298. }
  1299.  
  1300.  
  1301. {******************
  1302.  * Play functions
  1303.  *****************}
  1304.  
  1305. function  Play            (aWnd: hWnd; PlayString: PChar; Speed: Byte): THandle;
  1306. function  PlayChangeSpeed (PlayInst: THandle; Speed: Byte): Boolean;
  1307. function  PlayStop        (PlayInst: THandle): Boolean;
  1308. function  PlayFreeze      (PlayInst: THandle): Boolean;
  1309. function  PlayResume      (PlayInst: THandle): Boolean;
  1310. function  WhiteNoise      (FreqLow, FreqHigh, Duration: Word): Boolean;
  1311. procedure ToneInit;
  1312. procedure ToneOn          (Freq: Word);
  1313. procedure ToneOff;
  1314. function  TickCount: Longint;
  1315.  
  1316. {*****************
  1317. * Bios functions
  1318. *****************}
  1319.  
  1320.  
  1321. const
  1322.   ERR_TIME_OUT       = $80;        { prob. No disk            }
  1323.   ERR_BAD_SEEK       = $40;        { illegal track or sector? }
  1324.   ERR_BAD_NEC        = $20;        { controller card failed   }
  1325.   ERR_BAD_CRC        = $10;        { sector damaged           }
  1326.   ERR_DMA_BOUNDARY   = $09;        { software error           }
  1327.   ERR_BAD_DMA        = $08;        { software error           }
  1328.   ERR_RECORD_NOT_FND = $04;        { bad sector or track?     }
  1329.   ERR_WRITE_PROTECT  = $02;        { could also be invalid format }
  1330.   ERR_BAD_ADDR_MARK  = $01;        { probably unformatted      }
  1331.  
  1332. { BIOSReadSector - BIOSDriveType }
  1333.  
  1334.  
  1335.  
  1336. {--------------------------------------------------------------------}
  1337. implementation
  1338. {--------------------------------------------------------------------}
  1339.  
  1340. function DateAddDays         ;external 'TBPRO2' index 2003;
  1341. function DateDMYToJulian     ;external 'TBPRO2' index 2006;
  1342. function DateDMYToString     ;external 'TBPRO2' index 2002;
  1343. function DateGetFormat       ;external 'TBPRO2' index 2010;
  1344. function DateGetWeekday      ;external 'TBPRO2' index 2005;
  1345. function DateIntIsValid      ;external 'TBPRO2' index 2001;
  1346. function DateJulianToDMY     ;external 'TBPRO2' index 2007;
  1347. function DateSetFormat       ;external 'TBPRO2' index 2009;
  1348. function DateSetRange        ;external 'TBPRO2' index 2008;
  1349. function DateStringIsValid   ;external 'TBPRO2' index 2000;
  1350. function DateStringToDMY     ;external 'TBPRO2' index 2011;
  1351. function DateSubtractDates   ;external 'TBPRO2' index 2004;
  1352.  
  1353. function PopupCalender       ;external 'TBPRO2' index 1915;
  1354. function TimeGetFormat       ;external 'TBPRO2' index 2057;
  1355. function TimeHMSToSeconds    ;external 'TBPRO2' index 2052;
  1356. function TimeHMSToString     ;external 'TBPRO2' index 2054;
  1357. function TimeSecondsToHMS    ;external 'TBPRO2' index 2053;
  1358. function TimeSetFormat       ;external 'TBPRO2' index 2056;
  1359. function TimeSetRange        ;external 'TBPRO2' index 2055;
  1360. function TimeStringIsValid   ;external 'TBPRO2' index 2050;
  1361. function TimeStringToHMS     ;external 'TBPRO2' index 2051;
  1362. procedure TimeGetCurrentTime ;external 'TBPRO2' index 2058;
  1363.  
  1364.  
  1365. function IntGetRange         ;external 'TBPRO2' index 2100;
  1366. function IntSetRange         ;external 'TBPRO2' index 2101;
  1367. function IntGetValue         ;external 'TBPRO2' index 2102;
  1368. function IntSetValue         ;external 'TBPRO2' index 2103;
  1369. function IntSetMask          ;external 'TBPRO2' index 2104;
  1370. function IntSetSpin          ;external 'TBPRO2' index 2105;
  1371. function IntGetSpin          ;external 'TBPRO2' index 2106;
  1372. { IntSetDlgItemRange - IntGetDlgItemValue }
  1373.  
  1374. function FloatGetValue       ;external 'TBPRO2' index 2151;
  1375. function FloatSetValue       ;external 'TBPRO2' index 2156;
  1376. function FloatSetRange       ;external 'TBPRO2' index 2150;
  1377. function FloatGetRange       ;external 'TBPRO2' index 2155;
  1378. function FloatSetFormat      ;external 'TBPRO2' index 2157;
  1379. function FloatGetFormat      ;external 'TBPRO2' index 2158;
  1380. function FloatSetStyle       ;external 'TBPRO2' index 2152;
  1381. function FloatFormatString   ;external 'TBPRO2' index 2153;
  1382. function FloatFormatString2  ;external 'TBPRO2' index 2159;
  1383. function FloatSetMask        ;external 'TBPRO2' index 2154;
  1384. { FloatSetDlgItemRange - FloatSetDlgItemValue }
  1385.  
  1386. function GetToolBoxGlobal    ;external 'TBPRO1' index 2501;
  1387. function SetToolBoxGlobal    ;external 'TBPRO1' index 2500;
  1388.  
  1389. function GetFileString       ;external 'TBPRO1' index 1736;
  1390. function SysCreateSubDir     ;external 'TBPRO1' index 1713;
  1391. function SysDeleteFile       ;external 'TBPRO1' index 1718;
  1392. function SysDeleteSubDir     ;external 'TBPRO1' index 1715;
  1393. function SysDiskBytesFree    ;external 'TBPRO1' index 1732;
  1394. function SysDiskBytesTotal   ;external 'TBPRO1' index 1733;
  1395. function SysDiskInfo         ;external 'TBPRO1' index 1701;
  1396. function SysExecPgm          ;external 'TBPRO1' index 1725;
  1397. function SysFileSpec         ;external 'TBPRO1' index 1726;
  1398. { SysFindFirst - SysGetFileAttr }
  1399.  
  1400. function  InitToolbox        ;external 'TBPRO1' index 50;
  1401. function  ToolboxLoadDlls    ;external 'TBPRO1' index 51;
  1402. procedure ToolboxFreeDlls    ;external 'TBPRO1' index 52;
  1403. procedure ToolboxFreeAllDlls ;external 'TBPRO1' index 53;
  1404. function  GetToolboxVersion  ;external 'TBPRO1' index 54;
  1405.  
  1406. function  HourGlassCount     ;external 'TBPRO1' index 1403;
  1407. procedure HourGlassOff       ;external 'TBPRO1' index 1402;
  1408. procedure HourGlassOn        ;external 'TBPRO1' index 1401;
  1409.  
  1410. {StrCat - LongToString}
  1411. function StrRTrim            ;external 'TBPRO1' index 726;
  1412.  
  1413. { FloatToEString - StringToLong }
  1414.  
  1415. { ErrorNo - FileGetDateTime }
  1416.  
  1417. { ListAddStr - ListSelectStr }
  1418.  
  1419. { MemCmp - MemiCmd }
  1420.  
  1421. { MemHugeCmp - MemHugecCpy }
  1422.  
  1423. { Debug }
  1424. { function _MsgDisp            ;external 'TBPRO1' index 1303; }
  1425. function MsgDoDisp           ;external 'TBPRO1' index 1302;
  1426. function MsgLoad             ;external 'TBPRO1' index 1301;
  1427.  
  1428. function DlgFileOpenOne      ;external 'TBPRO1' index 2301;
  1429. function DlgFileOpenTwo      ;external 'TBPRO1' index 2302;
  1430. function DlgFontSelect       ;external 'TBPRO1' index 2303;
  1431. function DlgPrinterSetup     ;external 'TBPRO1' index 2300;
  1432. { EnumFiles }
  1433. procedure ExitNow            ;external 'TBPRO1' index 1603;
  1434. function FullMkDir           ;external 'TBPRO1' index 1735;
  1435.  
  1436. function GaugeGetPos         ;external 'TBPRO1' index 1203;
  1437. function GaugeGetRange       ;external 'TBPRO1' index 1201;
  1438. function GaugeSetColors      ;external 'TBPRO1' index 1205;
  1439. function GaugeSetPos         ;external 'TBPRO1' index 1204;
  1440. function GaugeSetRange       ;external 'TBPRO1' index 1202;
  1441. function GaugeSetTitle       ;external 'TBPRO1' index 1206;
  1442. procedure GetChildSize       ;external 'TBPRO1' index 500;
  1443. { MsgBox }
  1444. procedure  MsgLineMenuHelp   ;external 'TBPRO1' index 1602;
  1445. procedure  MsgLinePaint      ;external 'TBPRO1' index 1600;
  1446. procedure  MsgLineTextOut    ;external 'TBPRO1' index 1601;
  1447. procedure  OLRect            ;external 'TBPRO1' index  505;
  1448. procedure  OLLine            ;external 'TBPRO1' index  504;
  1449. function  PrinterGetDC       ;external 'TBPRO1' index 2308;
  1450. function  PrinterGetIC       ;external 'TBPRO1' index 2309;
  1451. function  PrinterGetDetails  ;external 'TBPRO1' index 2310;
  1452. function  RmTmp              ;external 'TBPRO1' index 2404;
  1453. function  WinExecProg        ;external 'TBPRO1' index 1727;
  1454.  
  1455. function  SSSetRowHeight     ;external 'TBPRO3' index 2800;
  1456. procedure SSGetRowHeightC (aWnd: hWnd; Row: TSS_Coord; NearPtr: Word);far;
  1457.                               external 'TBPRO3' index 2801;
  1458. function  SSGetRowHeight;
  1459.   var D : Double;
  1460.   begin SSGetRowHeightC(aWnd, Row, ofs(D)); SSGetRowHeight := D end;
  1461. function  SSInsRow           ;external 'TBPRO3' index 2804;
  1462. function  SSDelRow           ;external 'TBPRO3' index 2805;
  1463. function  SSSetColWidth      ;external 'TBPRO3' index 2900;
  1464. procedure SSGetColWidthC (aWnd: hWnd; Col: TSS_Coord; NearPtr: Word);far;
  1465.                               external 'TBPRO3' index 2901;
  1466. function SSGetColWidth;
  1467.   var D : Double;
  1468.   begin SSGetColWidthC(aWnd, Col, ofs(D)); SSGetColWidth := D end;
  1469. function  SSInsCol           ;external 'TBPRO3' index 2905;
  1470. function  SSDelCol           ;external 'TBPRO3' index 2904;
  1471. function  SSSetData          ;external 'TBPRO3' index 3001;
  1472. function  SSSetDataRange     ;external 'TBPRO3' index 3002;
  1473. function  SSGetData          ;external 'TBPRO3' index 3003;
  1474. function  SSGetDataLen       ;external 'TBPRO3' index 3004;
  1475. function  SSGetVisible       ;external 'TBPRO3' index 2714;
  1476. function  SSGetEditMode      ;external 'TBPRO3' index 3115;
  1477. function  SSSetEditMode      ;external 'TBPRO3' index 3114;
  1478. function  SSGetActiveCell    ;external 'TBPRO3' index 3116;
  1479. function  SSSetActiveCell    ;external 'TBPRO3' index 3117;
  1480. procedure SSSetMaxCols       ;external 'TBPRO3' index 3118;
  1481. function  SSGetMaxCols       ;external 'TBPRO3' index 3119;
  1482. procedure SSSetMaxRows       ;external 'TBPRO3' index 3120;
  1483. function  SSGetMaxRows       ;external 'TBPRO3' index 3121;
  1484. function  SSGetSelectBlock   ;external 'TBPRO3' index 3126;
  1485. function  SSSetSelectBlock   ;external 'TBPRO3' index 3127;
  1486. procedure SSGetShadowColor   ;external 'TBPRO3' index 3130;
  1487. procedure SSSetShadowColor   ;external 'TBPRO3' index 3131;
  1488. function  SSSetTypeEdit      ;external 'TBPRO3' index 3200;
  1489. function  SSSetTypePic       ;external 'TBPRO3' index 3201;
  1490. function  SSSetTypeStaticText;external 'TBPRO3' index 3203;
  1491. function  SSSetTypeDate      ;external 'TBPRO3' index 3204;
  1492. function  SSSetTypeTime      ;external 'TBPRO3' index 3205;
  1493. function  SSSetTypeInteger   ;external 'TBPRO3' index 3206;
  1494. function  SSSetTypeFloat     ;external 'TBPRO3' index 3207;
  1495. function  SSSetTypePicture   ;external 'TBPRO3' index 3209;
  1496. function  SSSaveToFile       ;external 'TBPRO3' index 3300;
  1497. function  SSSavetoBuffer     ;external 'TBPRO3' index 3301;
  1498. function  SSLoadFromFile     ;external 'TBPRO3' index 3302;
  1499. function  SSLoadFromBuffer   ;external 'TBPRO3' index 3303;
  1500. function  SSBuildDependencies;external 'TBPRO3' index 3402;
  1501. function  SSAddCustomFunction;external 'TBPRO3' index 3403;
  1502. function  SSShowCell         ;external 'TBPRO3' index 2710;
  1503. function  SSShowActiveCell   ;external 'TBPRO3' index 2711;
  1504. function  SSSetFormula       ;external 'TBPRO3' index 3505;
  1505. function  SSSetFormulaRange  ;external 'TBPRO3' index 3506;
  1506. function  SSGetFormula       ;external 'TBPRO3' index 3507;
  1507. function  SSGetFormulaLen    ;external 'TBPRO3' index 3508;
  1508. function  SSClear            ;external 'TBPRO3' index 2712;
  1509. function  SSClearRange       ;external 'TBPRO3' index 2713;
  1510. function  SSSetLock          ;external 'TBPRO3' index 2724;
  1511. function  SSSetLockRange     ;external 'TBPRO3' index 2725;
  1512. function  SSSetFont          ;external 'TBPRO3' index 2715;
  1513. function  SSSetFontRange     ;external 'TBPRO3' index 2716;
  1514. function  SSGetFont          ;external 'TBPRO3' index 2717;
  1515. function  SSSetCellType      ;external 'TBPRO3' index 2718;
  1516. function  SSSetCellTypeRange ;external 'TBPRO3' index 2719;
  1517. function  SSGetCellType      ;external 'TBPRO3' index 2720;
  1518. function  SSSetColor         ;external 'TBPRO3' index 2721;
  1519. function  SSSetColorRange    ;external 'TBPRO3' index 2722;
  1520. function  SSGetColor         ;external 'TBPRO3' index 2723;
  1521. function  SSGetTopLeftCell   ;external 'TBPRO3' index 3509;
  1522. function  SSGetBottomRightCell;external 'TBPRO3' index 3510;
  1523. function  SSSetBool          ;external 'TBPRO3' index 3511;
  1524. function  SSGetBool          ;external 'TBPRO3' index 3512;
  1525. function  SSClipOut          ;external 'TBPRO3' index 3513;
  1526. function  SSClipIn           ;external 'TBPRO3' index 3514;
  1527. function  SSSetSel           ;external 'TBPRO3' index 3600;
  1528. function  SSGetSel           ;external 'TBPRO3' index 3601;
  1529. function  SSReplaceSel       ;external 'TBPRO3' index 3602;
  1530. function  SSGetSelText       ;external 'TBPRO3' index 3603;
  1531. function  SSValidateFormula  ;external 'TBPRO3' index 3700;
  1532. procedure SSLogUnitstoColWidthC(aWnd: hWnd; Units: Integer; NearPtr: Word);far
  1533.                              ;external 'TBPRO3' index 3701;
  1534. function SSLogUnitstoColWidth;
  1535.   var D: Double;
  1536.   begin SSLogUnitstoColWidthC(aWnd, Units, ofs(D)); SSLogUnitstoColWidth:=D end;
  1537. procedure SSLogUnitsToRowHeightC(aWnd: hWnd; Row: TSS_Coord; Units: Integer; NearPtr: Word);far;
  1538.                               external 'TBPRO3' index 3702;
  1539. function SSLogUnitsToRowHeight;
  1540.   var D: Double;
  1541.   begin SSLogUnitsToRowHeightC(aWnd, Row, Units, ofs(D)); SSLogUnitsToRowHeight:=D end;
  1542. function  SSColWidthToLogUnits  ;external 'TBPRO3' index 3703;
  1543. function  SSRowHeightToLogUnits ;external 'TBPRO3' index 3704;
  1544. function  SSRecalc              ;external 'TBPRO3' index 3705;
  1545. function  SSDeSelectBlock       ;external 'TBPRO3' index 3706;
  1546.  
  1547. function  Play                  ;external 'TBPRO1' index 2551;
  1548. function  PlayChangeSpeed       ;external 'TBPRO1' index 2552;
  1549. function  PlayStop              ;external 'TBPRO1' index 2553;
  1550. function  PlayFreeze            ;external 'TBPRO1' index 2554;
  1551. function  PlayResume            ;external 'TBPRO1' index 2555;
  1552. function  WhiteNoise            ;external 'TBPRO1' index 2556;
  1553. procedure ToneInit              ;external 'TBPRO1' index 2557;
  1554. procedure ToneOn                ;external 'TBPRO1' index 2558;
  1555. procedure ToneOff               ;external 'TBPRO1' index 2559;
  1556. function  TickCount             ;external 'TBPRO1' index 2560;
  1557.  
  1558.  
  1559.  
  1560.  
  1561. begin
  1562. end.
  1563.